#include "stdio.h"
#include "stdint.h"

uint32_t row[5];

void display_m()
{
    for (int i = 0; i < 5; i++)
    {
        for (int j = 0, k = 0x01; j < 5; j++, k<<=1)
        {
            if ((row[i] & k) != 0) {
                putchar('1');
            } else {
                putchar('0');
            }
            putchar(' ');
        }
        printf("\n");
    }
}

int main() {
    for (size_t i = 0; i < sizeof(row) / sizeof(uint32_t); i++)
        row[i] = 0x01;

    uint32_t count = 0, dcount = 0;
    for (int i = 0; i < 5; i++, row[0]<<=1) 
    {
        row[1] = 0x01;
        for (int j = 0; j < 5; j++, row[1]<<=1)
        {
            row[2] = 0x01;
            for (int x = 0; x < 5; x++, row[2]<<=1)
            {
                row[3] = 0x01;
                for (int y = 0; y < 5; y++, row[3]<<=1)
                {
                    row[4] = 0x01;
                    for (int k = 0; k < 5; k++, row[4]<<=1)
                    {
                        count++;
                        uint32_t tmp = (row[0] | row[1] | row[2] | row[3] | row[4]);
                        // printf("tmp:%02X\n", tmp);
                        if (tmp == 0x1F)
                        {
                            dcount++;
                            display_m();
                            printf("===========\n");
                        }                        
                    }
                }
            }
        }
    }
    printf("count:%u, dcount:%u\n", count, dcount);
    getchar();
    return 0;
}